Integrand size = 27, antiderivative size = 102 \[ \int \frac {-a+b \cot (c+d x)}{\sqrt {a+b \cot (c+d x)}} \, dx=-\frac {(i a-b) \text {arctanh}\left (\frac {\sqrt {a+b \cot (c+d x)}}{\sqrt {a-i b}}\right )}{\sqrt {a-i b} d}+\frac {(i a+b) \text {arctanh}\left (\frac {\sqrt {a+b \cot (c+d x)}}{\sqrt {a+i b}}\right )}{\sqrt {a+i b} d} \]
-(I*a-b)*arctanh((a+b*cot(d*x+c))^(1/2)/(a-I*b)^(1/2))/d/(a-I*b)^(1/2)+(I* a+b)*arctanh((a+b*cot(d*x+c))^(1/2)/(a+I*b)^(1/2))/d/(a+I*b)^(1/2)
Time = 0.48 (sec) , antiderivative size = 137, normalized size of antiderivative = 1.34 \[ \int \frac {-a+b \cot (c+d x)}{\sqrt {a+b \cot (c+d x)}} \, dx=\frac {\frac {\left (b^2-a \sqrt {-b^2}\right ) \text {arctanh}\left (\frac {\sqrt {a+b \cot (c+d x)}}{\sqrt {a-\sqrt {-b^2}}}\right )}{\sqrt {a-\sqrt {-b^2}}}+\frac {\left (b^2+a \sqrt {-b^2}\right ) \text {arctanh}\left (\frac {\sqrt {a+b \cot (c+d x)}}{\sqrt {a+\sqrt {-b^2}}}\right )}{\sqrt {a+\sqrt {-b^2}}}}{b d} \]
(((b^2 - a*Sqrt[-b^2])*ArcTanh[Sqrt[a + b*Cot[c + d*x]]/Sqrt[a - Sqrt[-b^2 ]]])/Sqrt[a - Sqrt[-b^2]] + ((b^2 + a*Sqrt[-b^2])*ArcTanh[Sqrt[a + b*Cot[c + d*x]]/Sqrt[a + Sqrt[-b^2]]])/Sqrt[a + Sqrt[-b^2]])/(b*d)
Time = 0.43 (sec) , antiderivative size = 83, normalized size of antiderivative = 0.81, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.259, Rules used = {3042, 4022, 3042, 4020, 25, 73, 221}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {b \cot (c+d x)-a}{\sqrt {a+b \cot (c+d x)}} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {-a-b \tan \left (c+d x+\frac {\pi }{2}\right )}{\sqrt {a-b \tan \left (c+d x+\frac {\pi }{2}\right )}}dx\) |
\(\Big \downarrow \) 4022 |
\(\displaystyle -\frac {1}{2} (a-i b) \int \frac {1-i \cot (c+d x)}{\sqrt {a+b \cot (c+d x)}}dx-\frac {1}{2} (a+i b) \int \frac {i \cot (c+d x)+1}{\sqrt {a+b \cot (c+d x)}}dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -\frac {1}{2} (a+i b) \int \frac {1-i \tan \left (c+d x+\frac {\pi }{2}\right )}{\sqrt {a-b \tan \left (c+d x+\frac {\pi }{2}\right )}}dx-\frac {1}{2} (a-i b) \int \frac {i \tan \left (c+d x+\frac {\pi }{2}\right )+1}{\sqrt {a-b \tan \left (c+d x+\frac {\pi }{2}\right )}}dx\) |
\(\Big \downarrow \) 4020 |
\(\displaystyle \frac {i (a+i b) \int -\frac {1}{(1-i \cot (c+d x)) \sqrt {a+b \cot (c+d x)}}d(i \cot (c+d x))}{2 d}-\frac {i (a-i b) \int -\frac {1}{(i \cot (c+d x)+1) \sqrt {a+b \cot (c+d x)}}d(-i \cot (c+d x))}{2 d}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {i (a-i b) \int \frac {1}{(i \cot (c+d x)+1) \sqrt {a+b \cot (c+d x)}}d(-i \cot (c+d x))}{2 d}-\frac {i (a+i b) \int \frac {1}{(1-i \cot (c+d x)) \sqrt {a+b \cot (c+d x)}}d(i \cot (c+d x))}{2 d}\) |
\(\Big \downarrow \) 73 |
\(\displaystyle \frac {(a-i b) \int \frac {1}{-\frac {i \cot ^2(c+d x)}{b}-\frac {i a}{b}+1}d\sqrt {a+b \cot (c+d x)}}{b d}+\frac {(a+i b) \int \frac {1}{\frac {i \cot ^2(c+d x)}{b}+\frac {i a}{b}+1}d\sqrt {a+b \cot (c+d x)}}{b d}\) |
\(\Big \downarrow \) 221 |
\(\displaystyle \frac {(a+i b) \arctan \left (\frac {\cot (c+d x)}{\sqrt {a-i b}}\right )}{d \sqrt {a-i b}}+\frac {(a-i b) \arctan \left (\frac {\cot (c+d x)}{\sqrt {a+i b}}\right )}{d \sqrt {a+i b}}\) |
((a + I*b)*ArcTan[Cot[c + d*x]/Sqrt[a - I*b]])/(Sqrt[a - I*b]*d) + ((a - I *b)*ArcTan[Cot[c + d*x]/Sqrt[a + I*b]])/(Sqrt[a + I*b]*d)
3.2.4.3.1 Defintions of rubi rules used
Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[ {p = Denominator[m]}, Simp[p/b Subst[Int[x^(p*(m + 1) - 1)*(c - a*(d/b) + d*(x^p/b))^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] && Lt Q[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntL inearQ[a, b, c, d, m, n, x]
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-a/b, 2]/a)*ArcTanh[x /Rt[-a/b, 2]], x] /; FreeQ[{a, b}, x] && NegQ[a/b]
Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_) + (d_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[c*(d/f) Subst[Int[(a + (b/d)*x)^m/(d^2 + c*x), x], x, d*Tan[e + f*x]], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && NeQ[ b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && EqQ[c^2 + d^2, 0]
Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(c + I*d)/2 Int[(a + b*Tan[e + f*x])^m*( 1 - I*Tan[e + f*x]), x], x] + Simp[(c - I*d)/2 Int[(a + b*Tan[e + f*x])^m *(1 + I*Tan[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && NeQ[c^2 + d^2, 0] && !IntegerQ[m]
Leaf count of result is larger than twice the leaf count of optimal. \(1890\) vs. \(2(84)=168\).
Time = 0.08 (sec) , antiderivative size = 1891, normalized size of antiderivative = 18.54
method | result | size |
parts | \(\text {Expression too large to display}\) | \(1891\) |
derivativedivides | \(\text {Expression too large to display}\) | \(1905\) |
default | \(\text {Expression too large to display}\) | \(1905\) |
b/d*(-1/2/(a^2+b^2)^(1/2)*(-1/2*(2*(a^2+b^2)^(1/2)+2*a)^(1/2)*ln(b*cot(d*x +c)+a+(a+b*cot(d*x+c))^(1/2)*(2*(a^2+b^2)^(1/2)+2*a)^(1/2)+(a^2+b^2)^(1/2) )+2*((a^2+b^2)^(1/2)-a)/(2*(a^2+b^2)^(1/2)-2*a)^(1/2)*arctan((2*(a+b*cot(d *x+c))^(1/2)+(2*(a^2+b^2)^(1/2)+2*a)^(1/2))/(2*(a^2+b^2)^(1/2)-2*a)^(1/2)) )-1/2/(a^2+b^2)^(1/2)*(1/2*(2*(a^2+b^2)^(1/2)+2*a)^(1/2)*ln(b*cot(d*x+c)+a -(a+b*cot(d*x+c))^(1/2)*(2*(a^2+b^2)^(1/2)+2*a)^(1/2)+(a^2+b^2)^(1/2))+2*( (a^2+b^2)^(1/2)-a)/(2*(a^2+b^2)^(1/2)-2*a)^(1/2)*arctan((2*(a+b*cot(d*x+c) )^(1/2)-(2*(a^2+b^2)^(1/2)+2*a)^(1/2))/(2*(a^2+b^2)^(1/2)-2*a)^(1/2))))-a* (-1/4/d/b/(a^2+b^2)*ln(b*cot(d*x+c)+a+(a+b*cot(d*x+c))^(1/2)*(2*(a^2+b^2)^ (1/2)+2*a)^(1/2)+(a^2+b^2)^(1/2))*(2*(a^2+b^2)^(1/2)+2*a)^(1/2)*a^2-1/4/d* b/(a^2+b^2)*ln(b*cot(d*x+c)+a+(a+b*cot(d*x+c))^(1/2)*(2*(a^2+b^2)^(1/2)+2* a)^(1/2)+(a^2+b^2)^(1/2))*(2*(a^2+b^2)^(1/2)+2*a)^(1/2)+1/4/d/b/(a^2+b^2)^ (3/2)*ln(b*cot(d*x+c)+a+(a+b*cot(d*x+c))^(1/2)*(2*(a^2+b^2)^(1/2)+2*a)^(1/ 2)+(a^2+b^2)^(1/2))*(2*(a^2+b^2)^(1/2)+2*a)^(1/2)*a^3+1/4/d*b/(a^2+b^2)^(3 /2)*ln(b*cot(d*x+c)+a+(a+b*cot(d*x+c))^(1/2)*(2*(a^2+b^2)^(1/2)+2*a)^(1/2) +(a^2+b^2)^(1/2))*(2*(a^2+b^2)^(1/2)+2*a)^(1/2)*a+1/d/b/(a^2+b^2)^(1/2)/(2 *(a^2+b^2)^(1/2)-2*a)^(1/2)*arctan((2*(a+b*cot(d*x+c))^(1/2)+(2*(a^2+b^2)^ (1/2)+2*a)^(1/2))/(2*(a^2+b^2)^(1/2)-2*a)^(1/2))*a^2+1/d*b/(a^2+b^2)^(1/2) /(2*(a^2+b^2)^(1/2)-2*a)^(1/2)*arctan((2*(a+b*cot(d*x+c))^(1/2)+(2*(a^2+b^ 2)^(1/2)+2*a)^(1/2))/(2*(a^2+b^2)^(1/2)-2*a)^(1/2))-1/d/b/(a^2+b^2)^(3/...
Leaf count of result is larger than twice the leaf count of optimal. 1219 vs. \(2 (75) = 150\).
Time = 0.31 (sec) , antiderivative size = 1219, normalized size of antiderivative = 11.95 \[ \int \frac {-a+b \cot (c+d x)}{\sqrt {a+b \cot (c+d x)}} \, dx=\text {Too large to display} \]
-1/2*sqrt(-((a^2 + b^2)*d^2*sqrt(-(9*a^4*b^2 - 6*a^2*b^4 + b^6)/((a^4 + 2* a^2*b^2 + b^4)*d^4)) + a^3 - 3*a*b^2)/((a^2 + b^2)*d^2))*log(-(3*a^4*b + 2 *a^2*b^3 - b^5)*sqrt((b*cos(2*d*x + 2*c) + a*sin(2*d*x + 2*c) + b)/sin(2*d *x + 2*c)) + ((a^4 - b^4)*d^3*sqrt(-(9*a^4*b^2 - 6*a^2*b^4 + b^6)/((a^4 + 2*a^2*b^2 + b^4)*d^4)) + 2*(3*a^3*b^2 - a*b^4)*d)*sqrt(-((a^2 + b^2)*d^2*s qrt(-(9*a^4*b^2 - 6*a^2*b^4 + b^6)/((a^4 + 2*a^2*b^2 + b^4)*d^4)) + a^3 - 3*a*b^2)/((a^2 + b^2)*d^2))) + 1/2*sqrt(-((a^2 + b^2)*d^2*sqrt(-(9*a^4*b^2 - 6*a^2*b^4 + b^6)/((a^4 + 2*a^2*b^2 + b^4)*d^4)) + a^3 - 3*a*b^2)/((a^2 + b^2)*d^2))*log(-(3*a^4*b + 2*a^2*b^3 - b^5)*sqrt((b*cos(2*d*x + 2*c) + a *sin(2*d*x + 2*c) + b)/sin(2*d*x + 2*c)) - ((a^4 - b^4)*d^3*sqrt(-(9*a^4*b ^2 - 6*a^2*b^4 + b^6)/((a^4 + 2*a^2*b^2 + b^4)*d^4)) + 2*(3*a^3*b^2 - a*b^ 4)*d)*sqrt(-((a^2 + b^2)*d^2*sqrt(-(9*a^4*b^2 - 6*a^2*b^4 + b^6)/((a^4 + 2 *a^2*b^2 + b^4)*d^4)) + a^3 - 3*a*b^2)/((a^2 + b^2)*d^2))) + 1/2*sqrt(((a^ 2 + b^2)*d^2*sqrt(-(9*a^4*b^2 - 6*a^2*b^4 + b^6)/((a^4 + 2*a^2*b^2 + b^4)* d^4)) - a^3 + 3*a*b^2)/((a^2 + b^2)*d^2))*log(-(3*a^4*b + 2*a^2*b^3 - b^5) *sqrt((b*cos(2*d*x + 2*c) + a*sin(2*d*x + 2*c) + b)/sin(2*d*x + 2*c)) + (( a^4 - b^4)*d^3*sqrt(-(9*a^4*b^2 - 6*a^2*b^4 + b^6)/((a^4 + 2*a^2*b^2 + b^4 )*d^4)) - 2*(3*a^3*b^2 - a*b^4)*d)*sqrt(((a^2 + b^2)*d^2*sqrt(-(9*a^4*b^2 - 6*a^2*b^4 + b^6)/((a^4 + 2*a^2*b^2 + b^4)*d^4)) - a^3 + 3*a*b^2)/((a^2 + b^2)*d^2))) - 1/2*sqrt(((a^2 + b^2)*d^2*sqrt(-(9*a^4*b^2 - 6*a^2*b^4 +...
\[ \int \frac {-a+b \cot (c+d x)}{\sqrt {a+b \cot (c+d x)}} \, dx=- \int \frac {a}{\sqrt {a + b \cot {\left (c + d x \right )}}}\, dx - \int \left (- \frac {b \cot {\left (c + d x \right )}}{\sqrt {a + b \cot {\left (c + d x \right )}}}\right )\, dx \]
-Integral(a/sqrt(a + b*cot(c + d*x)), x) - Integral(-b*cot(c + d*x)/sqrt(a + b*cot(c + d*x)), x)
\[ \int \frac {-a+b \cot (c+d x)}{\sqrt {a+b \cot (c+d x)}} \, dx=\int { \frac {b \cot \left (d x + c\right ) - a}{\sqrt {b \cot \left (d x + c\right ) + a}} \,d x } \]
\[ \int \frac {-a+b \cot (c+d x)}{\sqrt {a+b \cot (c+d x)}} \, dx=\int { \frac {b \cot \left (d x + c\right ) - a}{\sqrt {b \cot \left (d x + c\right ) + a}} \,d x } \]
Time = 14.76 (sec) , antiderivative size = 2731, normalized size of antiderivative = 26.77 \[ \int \frac {-a+b \cot (c+d x)}{\sqrt {a+b \cot (c+d x)}} \, dx=\text {Too large to display} \]
2*atanh((32*a^4*b^2*d^2*(- (-16*a^4*b^2*d^4)^(1/2)/(16*(a^2*d^4 + b^2*d^4) ) - (a^3*d^2)/(4*(a^2*d^4 + b^2*d^4)))^(1/2)*(a + b*cot(c + d*x))^(1/2))/( (16*a^4*b^5*d^5)/(a^2*d^4 + b^2*d^4) + (16*a^6*b^3*d^5)/(a^2*d^4 + b^2*d^4 ) + (4*a^3*b^3*d^4*(-16*a^4*b^2*d^4)^(1/2))/(a^2*d^5 + b^2*d^5) + (4*a*b^5 *d^4*(-16*a^4*b^2*d^4)^(1/2))/(a^2*d^5 + b^2*d^5)) - (32*a^2*b^2*(- (-16*a ^4*b^2*d^4)^(1/2)/(16*(a^2*d^4 + b^2*d^4)) - (a^3*d^2)/(4*(a^2*d^4 + b^2*d ^4)))^(1/2)*(a + b*cot(c + d*x))^(1/2))/((16*a^4*b^3*d^3)/(a^2*d^4 + b^2*d ^4) + (4*a*b^3*d^2*(-16*a^4*b^2*d^4)^(1/2))/(a^2*d^5 + b^2*d^5)) + (8*a*b^ 2*(- (-16*a^4*b^2*d^4)^(1/2)/(16*(a^2*d^4 + b^2*d^4)) - (a^3*d^2)/(4*(a^2* d^4 + b^2*d^4)))^(1/2)*(a + b*cot(c + d*x))^(1/2)*(-16*a^4*b^2*d^4)^(1/2)) /((16*a^4*b^5*d^5)/(a^2*d^4 + b^2*d^4) + (16*a^6*b^3*d^5)/(a^2*d^4 + b^2*d ^4) + (4*a^3*b^3*d^4*(-16*a^4*b^2*d^4)^(1/2))/(a^2*d^5 + b^2*d^5) + (4*a*b ^5*d^4*(-16*a^4*b^2*d^4)^(1/2))/(a^2*d^5 + b^2*d^5)))*(- (-16*a^4*b^2*d^4) ^(1/2)/(16*(a^2*d^4 + b^2*d^4)) - (a^3*d^2)/(4*(a^2*d^4 + b^2*d^4)))^(1/2) - 2*atanh((32*a^2*b^2*((-16*a^4*b^2*d^4)^(1/2)/(16*(a^2*d^4 + b^2*d^4)) - (a^3*d^2)/(4*(a^2*d^4 + b^2*d^4)))^(1/2)*(a + b*cot(c + d*x))^(1/2))/((16 *a^4*b^3*d^3)/(a^2*d^4 + b^2*d^4) - (4*a*b^3*d^2*(-16*a^4*b^2*d^4)^(1/2))/ (a^2*d^5 + b^2*d^5)) - (32*a^4*b^2*d^2*((-16*a^4*b^2*d^4)^(1/2)/(16*(a^2*d ^4 + b^2*d^4)) - (a^3*d^2)/(4*(a^2*d^4 + b^2*d^4)))^(1/2)*(a + b*cot(c + d *x))^(1/2))/((16*a^4*b^5*d^5)/(a^2*d^4 + b^2*d^4) + (16*a^6*b^3*d^5)/(a...